package com.order;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableEurekaClient
public class orderServerApp {
	
	/**
	 * 启动 订单服务
	 * @param args
	 */
	public static void main(String[] args) {
		SpringApplication.run(orderServerApp.class,args);
	}

	@Bean // 注入 rest 模板s
	@LoadBalanced // 支持负载均衡 
	RestTemplate restTemplate() {
		return new RestTemplate();
	}
}
